package com.xian.test.java.java.stream;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * java flink 读取 文本文件
 */
public class StreamReadTextFile {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        DataStreamSource<String> personDataStreamSource = env.readTextFile("e:/test/person.txt");

        personDataStreamSource.print();



        env.execute("StreamReadTextFile");
    }
}
